﻿//-----------------------------------------------------------------------
// <copyright file="RoleFactory.cs" company="Mulala">
//     Copyright Mulala. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Mulala.Cavan.Domain.MainBoundedContext.SecurityModule
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    public static class RoleFactory
    {
        public static Role CreateRole(
                                string name,
                                string description,
            bool isUseDenied,
            IList<SysController> controllers,
            IList<SysAction> actions,
            DateTime editTime,
            string editUser)
        {
            Role role = new Role();
            role.Actions = actions;
            role.Controllers = controllers;
            role.Description = description;
            role.EditTime = editTime;
            role.EditUser = editUser;
            role.IsUseDenied = isUseDenied;
            role.Name = name;
            role.CreateTime = DateTime.Now;

            return role;
        }

        public static Role CreateRole(int id)
        {
            Role role = new Role();
            role.ID = id;

            return role;
        }
    }
}
